package com.yuanxiao;

import com.yuanxiao.bean.Resume;
import com.yuanxiao.repository.ResumeRepository;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class MongoBDAPP {

    public static void main(String[] args) {

        ApplicationContext applicationContext = SpringApplication.run(MongoBDAPP.class);
        ResumeRepository  resumeRepository = applicationContext.getBean(ResumeRepository.class);
        for (int i = 0; i < 1000; i++) {
            Resume resume  = new Resume();
            resume.setName("testT"+i);
            resume.setExpectSalary(10000+i);
            resume.setCity("shen1zhen");
            resumeRepository.save(resume);
        }

    }

}
